package com.felix.ocoupon.service;

import com.felix.ocoupon.entity.OcouponTemplate;
import com.felix.ocoupon.exception.OcouponException;
import com.felix.ocoupon.vo.OcouponTemplateSDK;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @author hsufelix
 * @email hsufelix@yeah.net
 * @Date 2020/11/14
 */
public interface ITemplateBaseService {

    /**
     * 根据优惠券模板ID获取优惠券模板信息
     * @param id
     * @return
     * @throws OcouponException
     */
    OcouponTemplate buildTemplateInfo(Integer id) throws OcouponException;

    /**
     * 查找所有可用的优惠券模板
     * @return
     */
    List<OcouponTemplateSDK> findAllUsableTemplate();

    /**
     * 获取模板ids 到 OcouponTemplateSDK的映射
     * @param ids
     * @return Map<Integer, OcouponTemplateSDK>
     */
    Map<Integer, OcouponTemplateSDK> findIds2TemplateSDK(Collection<Integer> ids);


}
